package com.kata.chapter5;

import com.kata.chapter4.InitEmperor;
import com.kata.chapter4.LazyEmperor;

/**
 * Created by Solidsnake on 2014/11/17.
 */
public class Main {

    public static void main(String[] args) throws ClassNotFoundException {

        System.out.println("启用文件读取池模式!");
        Class.forName(FileReadPool.class.getName());
        System.out.println("文件读取池启动完毕!");
        System.out.println("--------------------------");

        System.out.println("开始读取文件咯\r\n");
        for (int i = 0; i < 20 ; i++) {
            FileReadPool.FileRead target = FileReadPool.getFileRead();
            System.out.print("[ " + (i + 1) + " ] : ");
            target.readFile();
            System.out.println("===========================");
        }


    }
}
